package com.xm.po;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
/**
* @Description: 用户地址实体类
* @Author: Mr.Wang
* @Date: 2020/8/6
*/
public class UserAddress{
	//属性
	private Integer addressId;
	//用户id
	private Integer userId;
	//收货人名称
	private String userName;
	//收货人手机号码
	private String userPhone;
	//收货人电话
	private String userTel;
	//详细地址
	private String address;
	//邮编
	private String postCode;
	//是否默认地址
	private Integer isDefault;
	//删除标志 -1删除 1有效
	private Integer addressFlag;
	//创建时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	//构造器
	public UserAddress(){}
	public UserAddress(Integer userId){
		this.userId = userId;
	}

	public UserAddress(Integer userId,String userName,String userPhone,String address,Integer isDefault){
		this.userId=userId;
		this.userName=userName;
		this.userPhone=userPhone;
		this.address=address;
		this.isDefault=isDefault;
	}

	public UserAddress(Integer addressId,Integer userId,String userName,String userPhone,String address,Integer isDefault){
		this.addressId=addressId;
		this.userId=userId;
		this.userName=userName;
		this.userPhone=userPhone;
		this.address=address;
		this.isDefault=isDefault;
	}
	public UserAddress(Integer addressId,Integer userId,String userName,String userPhone,String userTel,String address,String postCode,Integer isDefault,Integer addressFlag,Date createTime){
		this.addressId=addressId;
		this.userId=userId;
		this.userName=userName;
		this.userPhone=userPhone;
		this.userTel=userTel;
		this.address=address;
		this.postCode=postCode;
		this.isDefault=isDefault;
		this.addressFlag=addressFlag;
		this.createTime=createTime;
}
	//getter setter方法
	public void setAddressId(Integer addressId){
		this.addressId=addressId;
	}
	public Integer getAddressId(){
		return addressId;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}
	public Integer getUserId(){
		return userId;
	}
	public void setUserName(String userName){
		this.userName=userName;
	}
	public String getUserName(){
		return userName;
	}
	public void setUserPhone(String userPhone){
		this.userPhone=userPhone;
	}
	public String getUserPhone(){
		return userPhone;
	}
	public void setUserTel(String userTel){
		this.userTel=userTel;
	}
	public String getUserTel(){
		return userTel;
	}
	public void setAddress(String address){
		this.address=address;
	}
	public String getAddress(){
		return address;
	}
	public void setPostCode(String postCode){
		this.postCode=postCode;
	}
	public String getPostCode(){
		return postCode;
	}
	public void setIsDefault(Integer isDefault){
		this.isDefault=isDefault;
	}
	public Integer getIsDefault(){
		return isDefault;
	}
	public void setAddressFlag(Integer addressFlag){
		this.addressFlag=addressFlag;
	}
	public Integer getAddressFlag(){
		return addressFlag;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}
	public Date getCreateTime(){
		return createTime;
	}
	public String toString(){
		return "Useraddress [addressId=" + addressId + ", userId=" + userId + ", userName=" + userName + ", userPhone=" + userPhone + ", userTel=" + userTel + ", address=" + address + ", postCode=" + postCode + ", isDefault=" + isDefault + ", addressFlag=" + addressFlag + ", createTime=" + createTime + "]";
	}
}

